package org.budo.support.exception.business;

/**
 * 业务异常，注意，这个异常仅用于业务异常，不会记录堆栈，错误信息仅来源于message，不要滥用 !!! 如果有底层异常，建议在抛出这个异常前，将底层异常计入日志
 * 
 * @author lmw
 */
public class BusinessException extends RuntimeException {
    private static final long serialVersionUID = 4795348074157421105L;

    private Integer errorCode;

    public BusinessException() {}

    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(Integer errorCode, String message) {
        super(message);
        this.setErrorCode(errorCode);
    }

    public Throwable fillInStackTrace() {
        return this;
    }

    public Integer getErrorCode() {
        return this.errorCode;
    }

    public void setErrorCode(Integer errorCode) {
        this.errorCode = errorCode;
    }
}